package com.tool.rabbitmq.binding;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;

/**
 * @author : zhaoxuan
 * @date : 2021/9/10 22:24
 * @description : RabbitBindingProperties
 */

@Validated
@ConfigurationProperties(prefix = "rabbitmq")
public class RabbitBindingProperties {

    @Valid
    private List<RabbitBinding> bindings = new ArrayList<>();

    public RabbitBindingProperties() {
    }

    public RabbitBindingProperties(List<RabbitBinding> bindings) {
        this.bindings = bindings;
    }

    public List<RabbitBinding> getBindings() {
        return bindings;
    }

    public void setBindings(List<RabbitBinding> rabbitBindings) {
        this.bindings = rabbitBindings;
    }
}
